package ch.bfh.ti.barcode.multiple;

import java.util.EventObject;

/**
 * This EventObject contains the data which is needed, when a new barcode is
 * being sent.
 * 
 * @author Dominik von Burg
 * 
 */
public class CodeEvent extends EventObject {
	private static final long serialVersionUID = 1L;

	private int[] data;

	/**
	 * Creates a new EventObject with the data of the barcode image.
	 * 
	 * @param source
	 *            Source of the event.
	 * @param data
	 *            The image with the barcode in the ARGB bitmap format.
	 */
	public CodeEvent(Object source, int[] data) {
		super(source);
		this.data = data;
	}

	/**
	 * Returns the data of the barcode image. The image is in the ARGB format.
	 * 
	 * @return The image with the barcode in the ARGB bitmap format.
	 */
	public int[] getData() {
		return data;
	}

}
